<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
	<link rel="icon" href="img/favicon.ico">
    <title>牟云音乐-万千好音乐海量曲库新歌热歌免费试听的高品质音乐平台！</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
	<link href="css/main.css" rel="stylesheet"/>
	<meta name="keywords" content="音乐，牟云音乐，网易云音乐，音乐馆，歌单，排行榜，歌手，免费下载，在线音乐，免费音乐,音乐，播放器，网易，下载，播放，DJ，免费，明星，精选，歌单，识别音乐，收藏，分享音乐，音乐互动，高音质，320K，音乐社交，官网，music.superboyjack.cn">
	<meta name="description" content="牟云音乐是一个音乐爱好者推出的一款网络音乐服务产品，海量音乐在线试听、新歌热歌在线首发、歌词翻译、手机铃声下载、高品质无损音乐试听、海量无损曲库、正版音乐下载、、MV观看等，是互联网音乐播放和下载的优选。">
	<!-- 百度站长验证 -->
	<meta name="baidu-site-verification" content="huVy09kJrV" />
	<!-- 百度统计 -->
	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "https://hm.baidu.com/hm.js?58f4b4a2c99429764a9757416df9e31f";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>
  </head>
  <body >
	
	<div class="mod_header">
	    <div class="section_inner">
	        <h1 class="qqmusic_title"><a href="index.html"><img src="img/musiclogo.png" alt="牟云音乐" class="music_logo"></a></h1>
	        <!-- 导航 S -->
	        <ul class="mod_top_nav" role="nav">
	            <li class="top_nav__item">
	                <a href="index.html" class="top_nav__link top_nav__link--current" title="音乐馆">音乐馆</a>
	            </li>
	            <li class="top_nav__item">
	                <a href="playlists.html" class="top_nav__link" title="歌单">歌单</a>
	            </li>
				<li class="top_nav__item">
				    <a href="#ranking" class="top_nav__link" title="排行榜">排行榜</a>
				</li>
				<li class="top_nav__item">
				    <a href="singers.html" class="top_nav__link" title="歌手">歌手</a>
				</li>
	        </ul>
	        <!-- 导航 E -->
			<div class="mod_top_search" role="search">
				<div class="mod_search_input">
					<input id="input" class="search_input__input" aria-label="请输入搜索内容" type="text" placeholder="搜索音乐、歌单、歌手" accesskey="s" oninput="OnInput (event)" />
					<button id="search" class="search_input__btn"><i class="icon_search sprite"></i><span class="glyphicon glyphicon-search"></span></button>
				</div>
				
				<div class="list-group " id="hot_search" style="display:none;">
					<li class="list-group-item">
					    <h4>热门搜索</h4>
					  </li>
					<div v-for="(hot_search,index) in hot_searchs" v-if="index < 8" v-cloak>
						<a class="list-group-item" :href="toSearchPage(hot_search.searchWord)" target="_blank">
							<!-- :href="toSearchPage(hot_search.searchWord)" -->
							<span class="search_hot__number">{{ index + 1 }}</span>
							<span class="search_hot__name">{{ hot_search.searchWord }}</span>
							<span class="search_hot__listen">{{ formatPlayCount(hot_search.score) }}</span>
							<span v-if="hot_search.iconUrl != null">
								<img class="search_hot__icon" :src="hot_search.iconUrl" />
							</span>
						</a>
					</div>
				</div>
				
				<div class="list-group " id="search_suggest" style="display:none;" v-cloak>
					<li class="list-group-item" v-if="songs!== undefined && songs!== null && songs.length>0">
					    <h4>单曲</h4> 
					</li>
					<div v-for="(song,index) in songs" v-if="index < 4">
						<a class="list-group-item" :href="toSongPage(song.id)" target="_blank">
							<span class="search_suggest">
								{{ song.name }} - 
								<span v-for="(singer,count) in song.artists">
									{{ singer.name }}
									<span v-if="count < song.artists.length-1">/</span>
								</span>
							</span>
						</a>
					</div>
					<li class="list-group-item" v-if="artists!== undefined && artists!== null && artists.length>0">
					    <h4>歌手</h4> 
					</li>
					<div v-for="(singer,index) in artists" v-if="index < 2">
						<a class="list-group-item" :href="toSingerPage(singer.id)" target="_blank">
							<span class="search_suggest">
								{{ singer.name }} 
							</span>
						</a>
					</div>
					<li class="list-group-item" v-if="albums!== undefined && albums!== null && albums.length>0">
					    <h4>专辑</h4> 
					</li>
					<div v-for="(album,index) in albums" v-if="index < 2">
						<a class="list-group-item" :href="toAlbumPage(album.id)" target="_blank">
							<span class="search_suggest">
								{{ album.name }}
								<span v-for="(singer,count) in album.artists">
									{{ singer.name }}
									<span v-if="count < album.artists.length-1">/</span>
								</span>
							</span>
						</a>
					</div>
				</div>
			</div>
	    </div>
	</div>
		<div class="background" id="recommendation" v-if="! showloading">
			<div class="container">
				<div class="row">
					<div class="page-header">
						<h2 class="text-center"><b>歌 单 推 荐</b> </h2>
					</div>
				</div>
				<div v-for="rows in 2"  v-cloak>
					<div class="row" id="playlist-row-1">
						<div v-for="count in 6">
							<div class="col-sm-6 col-md-2">
								<div>
									<a :href="toPlaylistPage(playlists[get_playlist(rows,count)].id)">
										<img class="img-responsive" :src="playlists[get_playlist(rows,count)].coverImgUrl + '?param=200y200'" :alt="playlists[(count-1)*rows].name">
									</a>
									<div class="caption">
										<div class="playlist-name">
											<a :href="toPlaylistPage(playlists[get_playlist(rows,count)].id)">
												<span class="web-font">{{ playlists[get_playlist(rows,count)].name }}</span>  
											</a>
										</div>
										<div class="row decoration">播放量: {{ playlists[get_playlist(rows,count)].playCount }}</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		  
	  
	<div class="background">
    <div class="container" id="ranking" name="ranking">
		<div class="row">
			<div class="page-header">
				<h2 class="text-center"><b>排 行 榜</b> </h2>
			</div>	
		</div>
		<div class="row">
			
			<ul class="toplist__list js_list">
				<li class="toplist__item item1 mod_cover col-md-3">
					<div class="toplist__box ranking_hot">
						<h3 class="toplist__hd"><a :href="toPlaylistPage(id)" target="_blank">热歌榜</a> </h3>
						<ul class="toplist__songlist">
							<div v-for="(song,index) in songs" >
							<li class="toplist__song" v-if="index < 5">
								<div class="toplist__number">{{ index + 1 }}</div>
								<div class="toplist__songname">
									<a :href="toSongPage(song.id)" target="_blank" onclick="" class="js_song" data-id="244200862" data-stat="y_new.index.toplist.songname">
										{{ song.name }}
										<!-- <span v-if="song.alia.length>0"> ({{ song.alia[0] }})</span> -->
									</a>
								</div>
								<div class="toplist__artist">
									<a :href="toSingerPage(song.ar[0].id)" target="_blank" onclick="" data-stat="y_new.index.toplist.singername">{{ song.ar[0].name }}</a>
								</div>
							</li>
							</div>
						</ul>
					</div>
				</li>
				<li class="toplist__item item1 mod_cover col-md-3">
					<div class="toplist__box ranking_new">
						<h3 class="toplist__hd"><a :href="toPlaylistPage(new_id)" target="_blank">新歌榜</a> </h3>
						<ul class="toplist__songlist">
							<div v-for="(song,index) in new_songs" >
							<li class="toplist__song" v-if="index < 5">
								<div class="toplist__number">{{ index + 1 }}</div>
								<div class="toplist__songname">
									<a :href="toSongPage(song.id)" target="_blank" onclick="" class="js_song" data-id="244200862" data-stat="y_new.index.toplist.songname">
										{{ song.name }}
										<!-- <span v-if="song.alia.length>0"> ({{ song.alia[0] }})</span> -->
									</a>
								</div>
								<div class="toplist__artist">
									<a :href="toSingerPage(song.ar[0].id)" target="_blank" onclick="" data-stat="y_new.index.toplist.singername">{{ song.ar[0].name }}</a>
								</div>
							</li>
							</div>
						</ul>
					</div>
				</li>
				<li class="toplist__item item1 mod_cover col-md-3">
					<div class="toplist__box ranking_singer">
						<h3 class="toplist__hd"><a href="singer_ranking.html" target="_blank">歌手榜</a> </h3>
						<ul class="toplist__songlist">
							<div v-for="(singer,index) in singers" >
							<li class="toplist__song" v-if="index < 8">
								<div class="toplist__number">{{ index + 1 }}</div>
								<div class="toplist__songname">
									<a :href="toSingerPage(singer.id)" target="_blank" onclick="" class="js_song" data-id="244200862" data-stat="y_new.index.toplist.songname">
										{{ singer.name }}
									</a>
								</div>
							</li>
							</div>
						</ul>
					</div>
				</li>
				<li class="toplist__item item1 mod_cover col-md-3">
					<div class="toplist__box ranking_oumei">
						<h3 class="toplist__hd"><a :href="toPlaylistPage(oumei_id)" target="_blank">欧美榜</a> </h3>
						<ul class="toplist__songlist">
							<div v-for="(song,index) in oumei_songs" >
							<li class="toplist__song" v-if="index < 5">
								<div class="toplist__number">{{ index + 1 }}</div>
								<div class="toplist__songname">
									<a :href="toSongPage(song.id)" target="_blank" onclick="" class="js_song" data-id="244200862" data-stat="y_new.index.toplist.songname">
										{{ song.name }}
										<!-- <span v-if="song.alia.length>0"> ({{ song.alia[0] }})</span> -->
									</a>
								</div>
								<div class="toplist__artist">
									<a :href="toSingerPage(song.ar[0].id)" target="_blank" onclick="" data-stat="y_new.index.toplist.singername">{{ song.ar[0].name }}</a>
								</div>
							</li>
							</div>
						</ul>
					</div>
				</li>
			</ul>
		</div>
	</div>
	</div>
	<!-- © 2019 <a href="http://www.superboyjack.cn" title="http://www.superboyjack.cn">牟云音乐</a>  丨 由 
				<a href="http://www.superboyjack.cn" title="superBoyJack" target="_blank">Jack</a> 设计开发  丨 
				<a href="/" target="_blank" title="Jack的博客">Jack的博客</a> 丨 
				<a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email=zyc0303@vip.qq.com" target="_blank" title="联系站长">zyc0303@vip.qq.com</a> 丨 运行在  
				<a href="http://www.qcloud.com/redirect.php?redirect=1001&amp;cps_key=8c96bc9f7c143bf40b60cfd558885a8d" target="_blank" title="腾讯云">腾讯云</a> -->
				<!-- mlwei.com底部版权代码 -->
	<footer class="footer">
	    <div class="container">	
			<div style="text-decoration:none; text-align:center; padding:20px 0;">
				<div style="width:600px;margin:0 auto; padding:20px 0;">
					<p style="margin:10px 0px;">
					<b>Copyright © 2019
					<a href="https://superBoyJack.cn" target="_blank" title="superBoyJack"> superBoyJack</a> 版权所有 Powered By 
					<a href="http://wpa.qq.com/msgrd?uin=2656288235" target="_blank" title="superBoyJack">superBoyJack</a> Design.&nbsp;&nbsp;
					</b>
					<!-- 备案信息代码 -->
					</p>
					<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41152502000110" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
						<img src="https://superboyjack.cn/upload/2019/11/%E5%A4%87%E6%A1%88%E5%9B%BE%E6%A0%87-b8473f72b5dc4bf1885d394815c38a9a.png" style="float:left;"/>
						<p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">
						豫公网安备 41152502000110号 豫ICP备19039675号
						</p>
					</a>
				</div>
			</div>
		</div>
	</footer>
	
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	<script src="js/jquery.base64.js"></script>
	<script>
		
		
		// 格式化播放量
		function formatPlayCount(count){
			if(count >= 100000)
				return (count/10000).toFixed(2) + "万";
			else
				return count;
		}
		$.getJSON(
		    "https://api.music.superboyjack.cn/top/playlist/",
		    function(data) {
				recommendationVue.showloading = true;
				for(var i=0;i<data.playlists.length;i++){
					// 向推荐歌单数组里遍历添加歌单
					recommendationVue.playlists.push({
						id: data.playlists[i].id,
						coverImgUrl: data.playlists[i].coverImgUrl.replace('http','https'),
						name: data.playlists[i].name,
						playCount: formatPlayCount(data.playlists[i].playCount)
						});
				}
				recommendationVue.showloading = false;
		    }
		);

		// 推荐歌单Vue
		var recommendationVue = new Vue({
		  el: '#recommendation',
		    data: {
				searchtext: '',
				showloading: true,
		        playlists: [
					
				]
		    },
			methods: {
				get_playlist: function (rows,colum){
					if(rows == 1)
						return (colum-1)*rows;
					else
						return (colum-1)+(rows-1)*6;
				},
				// 传送至相应的歌单详情页面
				toPlaylistPage: function (id) {
					return 'playlist.html?'+ $.base64.encode('id=' + id);
				}
			  }
		});
		
		var rankingVue = new Vue({
		  el: '#ranking',
		    data: {
				id: '', //热歌榜
				trackUpdateTime: '', //更新时间
		        songs: [],
				new_id: '', //新歌榜
				new_trackUpdateTime: '', 
				new_songs: [],
				oumei_id: '', //欧美榜
				oumei_trackUpdateTime: '', 
				oumei_songs: [],
				singer_updateTime: '',
				singers: [],//歌手
		    },
			methods: {
				get_index: function (rows,colum){
					if(rows == 1)
						return (colum-1)*rows;
					else
						return (colum-1)+(rows-1)*6;
				},
				// 传送至相应的歌手详情页面
				toSingerPage: function (id) {
					return 'singer.html?'  +$.base64.encode('id=' + id);
				},
				// 传送至相应的歌单详情页面
				toPlaylistPage: function (id) {
					return 'playlist.html?' + $.base64.encode('id=' + id);
				},
				toSongPage: function (id) {
					return 'player.html?'  +$.base64.encode('id=' + id);
				},
			  }
		});
		setTimeout(function () {
		
		// 获取热歌榜数据
		$.getJSON(
		    "https://api.superboyjack.cn/top/list?idx=1",
		    function(data) {
				if(data.code == 200){
					rankingVue.id = data.playlist.id;
					//rankingVue.trackUpdateTime = data.playlist.trackUpdateTime;
					rankingVue.songs = data.playlist.songs;
					
				}
		    }
		);
		// 获取新歌榜数据
		$.getJSON(
		    "https://api.superboyjack.cn/top/list?idx=0",
		    function(data) {
				if(data.code == 200){
					rankingVue.new_id = data.playlist.id;
					//rankingVue.new_trackUpdateTime = data.playlist.trackUpdateTime;
					rankingVue.new_songs = data.playlist.songs;
				}
		    }
		);
		// 获取歌手榜数据
		$.getJSON(
		    "https://api.superboyjack.cn/toplist/artist",
		    function(data) {
				if(data.code == 200){
					//rankingVue.singer_updateTime = data.list.updateTime;
					rankingVue.singers = data.playlist.artists;
				}
		    }
		);
		// 获取欧美榜数据
		$.getJSON(
		    "https://api.superboyjack.cn/top/list?idx=6",
		    function(data) {
				if(data.code == 200){
					rankingVue.oumei_id = data.playlist.id;
					//rankingVue.oumei_trackUpdateTime = data.playlist.trackUpdateTime;
					rankingVue.oumei_songs = data.playlist.songs;
				}
		    }
		);
		}, 900);
		
		// 输入框检测事件
			function OnInput (event) {
				// 如果输入框有内容
				if(event.target.value != ''){
					$.getJSON(
					    "https://api.music.superboyjack.cn/search/suggest?keywords=" + event.target.value,
					    function(data) {
							if(data.code == 200){
								suggestVue.songs = data.result.songs;
								suggestVue.albums = data.result.albums;
								suggestVue.artists = data.result.artists;
							}
					    }
					);
					$('#hot_search').css("display","none");//隐藏热搜div
					$('#search_suggest').css("display","block");//显示结果div
				}else{
					if(hotVue.hot_searchs == ''){
						$.getJSON(
						    "https://api.music.superboyjack.cn/search/hot/detail",
						    function(data) {
								if(data.code == 200){
									hotVue.hot_searchs = data.data;
									hotVue.message = data.message;
								}
						    }
						);
					};
					$('#search_suggest').css("display","none");//隐藏结果div
					$("#hot_search").css("display","block");//显示热搜div
				}
			}
			
			// 输入框失去焦点事件
			$("input").blur(function(){
				// 延迟200毫秒隐藏
				setTimeout(function () {
					$("#hot_search").css("display","none");
					$("#search_suggest").css("display","none");
				}, 200);
				
			});	
			// 输入框得到焦点事件
			$("input").focus(function(){
				if($('#input').val() != ''){
					$.getJSON(
					    "https://api.music.superboyjack.cn/search/suggest?keywords=" + event.target.value,
					    function(data) {
							if(data.code == 200){
								suggestVue.songs = data.result.songs;
								suggestVue.albums = data.result.albums;
								suggestVue.artists = data.result.artists;
							}
					    }
					);
					$('#hot_search').css("display","none");//隐藏热搜div
					$('#search_suggest').css("display","block");//显示结果div
				}else{
					if(hotVue.hot_searchs == ''){
						$.getJSON(
						    "https://api.music.superboyjack.cn/search/hot/detail",
						    function(data) {
								if(data.code == 200){
									hotVue.hot_searchs = data.data;
									hotVue.message = data.message;
								}
						    }
						);
					};
					$('#search_suggest').css("display","none");//隐藏结果div
					$("#hot_search").css("display","block");//显示热搜div
				}
				$("body").keydown(function() {
					if (event.keyCode == "13") {//keyCode=13是回车键
						$('#search').click();
		            }
		         });
			});
			
			$('#search').on('click',function(){
				if($('#input').val() != '')
			    window.location.href="search_page.html?keywords="+$('#input').val();
			  })
			
			var hotVue = new Vue({
				el: '#hot_search',
				data: {
					hot_searchs: [],
					message : '',
				},
				methods: {
					//搜索页面
					toSearchPage: function(keywords){
						return 'search_page.html?keywords=' + keywords;
					},
					// 传送至相应的歌曲详情页面
					toSongPage: function (id) {
						return 'player.html?id=' + id;
					},
					// 传送至相应的歌单详情页面
					toPlaylistPage: function (id) {
						return 'playlist.html?id=' + id;
					},
					// 格式化音乐时长
					formatDuraton: function (time){
						if(time > -1){
							var temp;
							var sec = Math.floor(time/1000);
							//var min = Math.floor(time/60) % 60;
							var min = Math.floor(sec/60);
							sec = sec - min*60;
							if(min < 10){
								temp = "0" + min + ":";
							}else
								temp = min + ":";
							if(sec < 10){
								temp += "0" + sec ;
							}else
								temp += sec ;
						}
						return temp;
					},
					//时间戳转换为日期
					timestampToTime: function(timestamp) {
						var date = new Date(timestamp);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
						var Y = date.getFullYear() ;
						var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) ;
						var D = date.getDate() ;
						var h = date.getHours() ;
						if(h < 10)
							h = '0' + h;
						var m = date.getMinutes() ;
						if(m < 10)
							m = '0' + m;
						var s = date.getSeconds();
						return Y + '年' + M + '月' + D + '日';
					},
					// 格式化
					formatPlayCount: function (count){
						if(count >= 100000)
							return (count/10000).toFixed(2) + "万";
						else
							return count;
					},
				}
			});
			
			var suggestVue = new Vue({
				el: '#search_suggest',
				data: {
					songs: [],
					artists: [],
					albums: [],
				},
				methods: {
					// 传送至相应的歌曲详情页面
					toSongPage: function (id) {
						return 'player.html?' + $.base64.encode('id=' + id);
					},
					//传送至相应的专辑详情页面
					toAlbumPage: function (id) {
						return 'album.html?' + $.base64.encode('id=' + id);
					},
					// 传送至相应的歌手详情页面
					toSingerPage: function (id) {
						return 'singer.html?' + $.base64.encode('id=' + id);
					},
				},
			});
	</script>
  </body>
</html>
